<template>
  <Layout>
    <AccountExpend v-if="hasPermission(['home_manage_accountData'])"></AccountExpend>
    <OverviewData v-if="hasPermission(['home_manage_overviewData'])"></OverviewData>
    <GeneralizeTotal v-if="hasPermission(['home_manage_promoteData'])"></GeneralizeTotal>
    <WeekData v-if="hasPermission(['home_manage_sevenDaysData'])"></WeekData>
    <WeekExpend v-if="hasPermission(['home_manage_consumData'])"></WeekExpend>
  </Layout>
</template>

<script>
import Layout from "@/components/layout";

import AccountExpend from "./components/account-expend";
import OverviewData from "./components/overview-data";
import GeneralizeTotal from "./components/generalize-total";
import WeekData from "./components/week-data";
import WeekExpend from "./components/week-expend";

import permissionMixin from "@/mixins/permission";

import { hasPermission } from "@/utils";

export default {
  mixins: [permissionMixin],
  components: {
    Layout,
    AccountExpend,
    OverviewData,
    GeneralizeTotal,
    WeekData,
    WeekExpend
  },
  methods: {
    hasPermission
  }
};
</script>